package pkmn.move.indirectAction;

import java.util.Random;
import pkmn.Pokemon;
import pkmn.status.Status;
import pkmn.status.StatusEnum;

public class ApplySleep extends IndirectAction{

    public void execute(Pokemon pokemon) {
        if (pokemon.getStatus().equals(StatusEnum.sleep)){
            System.out.println(pokemon.getName() + " already asleep!");
        }else if (pokemon.getStatus().equals(StatusEnum.none)){
            pokemon.setStatus(new Status(StatusEnum.sleep, new Random().nextInt(5) + 1));
            System.out.println(pokemon.getName() + " fell asleep!");
        }else
            System.out.println("But, it failed!");
    }
}
